package widget.common.event
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.MovieClip;
	import flash.utils.ByteArray;
	
	public class LoadDataEvent extends BaseEvent
	{
		public static const COMPLETE_LOADER:String = "completeLoader";
		public static const TIMEOUT_LOADER:String = "timeOutLoader";
		private var bitdata:BitmapData = null;
		private var mcdata:MovieClip = null;
		private var txtdata:String = null;
		private var bytes:ByteArray = null;
		public function LoadDataEvent(type:String,data:*)
		{
			super(type,data);
			if(data is Bitmap){
				bitdata = Bitmap(data).bitmapData.clone();
			}else if(data is MovieClip){
				mcdata = MovieClip(data);
			}else if(data is ByteArray){
				bytes = ByteArray(data);
			}else{
				txtdata = data;
			}
		}
		
		public function getBitmapData():BitmapData{
			return bitdata;
		}
		
		public function getMovieClip():MovieClip{
			return mcdata;
		}
	
		public function getTxtFile():String{
			return txtdata;
		}		
		
		public function getBytesArray():ByteArray{
			return bytes;
		}
	}
}